<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">


<head th:include="/common/base :: base">
</head>
<span ><script type="text/javascript" th:src="@{/js/pcjs/Mydate.js}"></script></span>
<body>
<div style="width:500px ; margin: auto;">
	<div class="panel panel-default">
		<div class="panel-heading">
			修改类型
		</div>
		<div class="panel-body">
			<form class="form-horizontal" role="form" th:action="@{/admin/type/edit}" method="post" enctype="multipart/form-data">
				<div class="form-group">
					<input type="hidden" th:value="${typeMap['typeId']}"/>
					<label for="firstname" class="col-sm-2 control-label">类型名:</label>
					<div class="col-sm-10">
						<input type="text" class="form-control" id="firstname"  name="typeName"
						th:value="${typeMap['typeName']}"
						>
					</div>
				</div>
				<div class="form-group">
					<label for="firstname" class="col-sm-2 control-label">时&nbsp;&nbsp;&nbsp;&nbsp;间:</label>
					<div class="col-sm-10">
						<input type="text" class="layui-input form-control" id="typeTime" name="typeTime"
							   th:value="${typeMap['typeTime']}"
							   placeholder="yyyy-MM-dd">
					</div>
				</div>
				<div class="form-group">
					<label for="firstname2" class="col-sm-2 control-label">父类型:</label>
					<div class="col-sm-10" id="firstname2">
						<select class="form-control" name="typeParentid">
							<option th:each="type : ${typeList}"
									th:value="${type.getTypeId()}"
									th:text="${type.getTypeName()}"
									th:if="${typeMap['typePId'] eq type.typeId} "
									th:attr="selected = true"/>

							<option th:each="type : ${typeList}"
									th:value="${type.getTypeId()}"
									th:text="${type.getTypeName()}"
									th:if="${typeMap['typePId'] ne type.typeId} "
									th:attr="selected = false"/>
						</select>
					</div>
				</div>
				<div class="form-group">
					<label for="firstname" class="col-sm-2 control-label">封&nbsp;&nbsp;&nbsp;&nbsp;面:</label>
					<div class="col-sm-10" >
						<input type="file" name="imgFile"/>
					</div>
				</div>
				<div class="form-group">
					<label for="firstname4" class="col-sm-2 control-label">描述:</label>
					<div class="layui-input-block">
						<textarea name="typeDescription" th:text="${typeMap['typeDesc']}" id="firstname4" class="layui-textarea"></textarea>
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-offset-2 col-sm-10">
						<button type="submit" class="btn btn-success">确定</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<button type="reset" class="btn btn-primary">重置</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<button type="button"  class="btn btn-info" onclick="javascript:history.go(-1)" >返回</button>
					</div>
				</div>
			</form>
		</div>
	</div>
</div>
</body>

</html>